package com.eastfair.venueservice.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.request.PageParams;
import com.eastfair.boot.service.SuperService;
import com.eastfair.core.base.R;
import com.eastfair.venuebooking.vo.ExhibitionSpaceVO;
import com.eastfair.venuebooking.vo.ExhibitionVO;
import com.eastfair.venueservice.dto.ExhibitionManageDTO;
import com.eastfair.venueservice.dto.ExhibitionManageQuery;
import com.eastfair.venueservice.entity.ExhibitionManage;
import com.eastfair.venueservice.vo.ExhibitionManageVO;
import com.eastfair.venueservice.vo.ExhibitionSpaceSiteVO;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 业务接口
 * 综合服务展会
 * </p>
 *
 * @author linan
 * @date 2022-07-15
 */
public interface ExhibitionManageService extends SuperService<ExhibitionManage> {

    /**
     * 添加展会
     * @param exhibitionSaveDTO exhibitionSaveDTO
     * @return R<Boolean>
     */
    R<Boolean> updateExhibitionManage(ExhibitionManageDTO exhibitionSaveDTO);

    /**
     * 查询展会列表（综合）
     * @param exhibitionManageQuery exhibitionManageQuery
     * @return R<ExhibitionManageVO>
     */
    R<IPage<ExhibitionManageVO>> queryExhibitionManage(PageParams<ExhibitionManageQuery> exhibitionManageQuery);

    /**
     * 查询展会下拉列表（综合）
     * @param exhibitionManageQuery
     * @return
     */
    R<List<ExhibitionManageVO>> queryAllExhibitionManage(ExhibitionManageQuery exhibitionManageQuery);

    /**
     * 通过服务商查询进行中的展会
     * @param exhibitionManageQuery exhibitionManageQuery
     * @return
     */
    R<ExhibitionManageVO> queryExhibitionManageByProvider(ExhibitionManageQuery exhibitionManageQuery);

    /**
     * 查询展会详情
     * @param exhibitionManageQuery exhibitionManageQuery
     * @return R<IPage<ExhibitionManageVO>>
     */
    R<ExhibitionManageVO> queryExhibitionManageDetail(PageParams<ExhibitionManageQuery> exhibitionManageQuery);

    /**
     * 展会ID查询展会场地
     * @param exhibitionManageId
     * @param serviceProviderId
     * @return
     */
    R<List<ExhibitionSpaceVO>> querySpaceByExhibitionManageId(ExhibitionManage exhibitionManageId, Long serviceProviderId);

    /**
     * 查询展会的展厅和展位.
     *
     * @param exhibitionManageId the exhibition manage id
     * @return the list
     */
    List<ExhibitionSpaceSiteVO> querySpaceSiteByExhibitionManageId(Long exhibitionManageId);

    /**
     * 展会概述
     * @param exhibitionManage exhibitionManage
     * @return Map
     */
    Map<String,Object> queryExhibitionSummary(ExhibitionManage exhibitionManage);

    /**
     * 查询展会未同步的所有展会
     * @return List<ExhibitionManageVO>
     */
    List<ExhibitionManageVO> queryNeedSyncExhibitionManage();

    /**
     * 查询近期开展的展会列表.
     *
     * @param pageParams the page params
     * @return the list
     */
    Page<ExhibitionManageVO> listLatestExhibition(PageParams<ExhibitionManageDTO> pageParams);

    /**
     * 展会同步回调
     * @param ids
     * @return
     */
    Boolean syncCallback(List<Long> ids);
}
